﻿@{ Layout = "../Shared/_LayoutLayer.cshtml"; }

<div class="form-group">
  <label>复制到站点</label>
  <multiselect v-on:select="onSiteSelect" v-model="site" placeholder="选择或者输入文字搜索站点..." :options="sites" :searchable="true"
    :show-labels="false" label="siteName" track-by="siteName">
    <template slot="singleLabel" slot-scope="props">{{ props.option.siteName }}</template>
    <template slot="option" slot-scope="props">
      {{ props.option.siteName }}
    </template>
  </multiselect>
</div>

<div class="form-group">
  <label>
    复制到栏目
    <small v-show="isSubmit && !channel" class="text-danger">请选择需要将内容复制到的栏目</small>
  </label>
  <multiselect v-on:select="onChannelSelect" v-model="channel" placeholder="选择或者输入文字搜索栏目..." :options="channels"
    :searchable="true" :show-labels="false" label="channelName" track-by="channelName">
    <template slot="singleLabel" slot-scope="props">{{ props.option.channelName }}</template>
    <template slot="option" slot-scope="props">
      {{ props.option.channelName }}
    </template>
  </multiselect>
</div>

<div class="form-group">
  <label>复制选项</label>
  <div class="mt-2 ml-2">
    <div class="radio radio-primary form-check-inline">
      <input v-model="copyType" type="radio" id="Copy" value="Copy">
      <label for="Copy"> 完全复制 </label>
    </div>
    <div class="radio radio-primary form-check-inline">
      <input v-model="copyType" type="radio" id="Reference" value="Reference">
      <label for="Reference"> 引用地址</label>
    </div>
    <div class="radio radio-primary form-check-inline">
      <input v-model="copyType" type="radio" id="ReferenceContent" value="ReferenceContent">
      <label for="ReferenceContent"> 引用内容
      </label>
    </div>
  </div>
  <small v-if="copyType === 'Copy'" class="text-warning">
    “完全复制”将创建内容的副本，并拷贝到指定栏目下，副本和原始内容之间不存在关系。
  </small>
  <small v-if="copyType === 'Reference'" class="text-warning">
    “引用地址”将创建内容的副本，并拷贝到指定栏目下，内容副本仅是原内容的引用，内容副本链接将和原内容链接一致。
  </small>
  <small v-if="copyType === 'ReferenceContent'" class="text-warning">
    “引用内容”将创建内容的副本，并拷贝到指定栏目下，同时内容副本的数据与原内容保持同步，内容副本的链接指向副本内容。
  </small>
</div>

<div class="form-group">
  <label>选中的内容</label>
  <table class="bg-white table tablesaw table-bordered table-hover">
    <thead>
      <tr>
        <th class="text-center text-nowrap">内容Id </th>
        <th>内容标题(点击查看) </th>
        <th class="text-center text-nowrap">添加时间</th>
        <th class="text-center text-nowrap">状态</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="content in contents">
        <td class="text-center">{{ content.id }}</td>
        <td v-html="content.title"></td>
        <td class="text-center text-nowrap">{{ content.addDate }}</td>
        <td class="text-center text-nowrap" v-html="content.checkState"></td>
      </tr>
    </tbody>
  </table>
</div>

<hr />

<div class="text-right mr-1">
  <button v-on:click="btnSubmitClick" type="button" class="btn btn-primary m-l-5">复 制</button>
  <button type="button" class="btn btn-default m-l-5" onclick="window.parent.layer.closeAll()">取 消</button>
</div>

@section Scripts{
<script src="../assets/lib/vue-multiselect/script-2.1.0.min.js"></script>
<link href="../assets/lib/vue-multiselect/style-2.1.0.min.css" rel="stylesheet" type="text/css" />
<script src="contentsLayerCopy.js" type="text/javascript"></script> }